package com.adcc.swingui.demo.menubar;

import java.awt.Container;
import java.awt.print.Printable;
import java.util.List;

import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

import com.adcc.swingui.base.DefaultMenuBar;
import com.jidesoft.swing.JideMenu;

public class HangKongQiXiangMenuBut extends DefaultMenuBar {
	/**
	 * 航空气象（台风和火山灰图标问题）
	 * 
	 * @author charlie
	 * 
	 */
	JMenu menu;
	JMenu pJMenu;
	JMenu mjmenu;

	JMenuItem tyhItem;
	JMenuItem volcanoitem;
	JMenuItem itemz;
	JMenuItem itemg;
	JMenuItem metequItem;
	JMenuItem numItem;
	JMenuItem liveItem;
	JMenuItem importItem;
	JMenuItem lowItem;
	JMenuItem airItem;

	public HangKongQiXiangMenuBut(Container container) {
		super(container);
	}

	@Override
	protected JComponent build() {
		// TODO Auto-generated method stub

		menu = new JideMenu("航空气象资料");
		menu.setMnemonic('K');

		// 气象报文检索
		metequItem = new JMenuItem("气象报文检索", new ImageIcon());
		addChildMenu(menu, metequItem, "meteorMessageQuery", true);

		// 机场数字通报
		numItem = new JMenuItem("机场数字通报", new ImageIcon());
		addChildMenu(menu, numItem, "numbersBulletin", true);

		// 机场实况预报
		liveItem = new JMenuItem("机场实况预报", new ImageIcon());
		addChildMenu(menu, liveItem, "Predictionlive", true);

		// 重要气象预报
		importItem = new JMenuItem("重要气象预报", new ImageIcon());
		addChildMenu(menu, importItem, "importantWeather", true);

		// 低空气象情报
		lowItem = new JMenuItem("低空气象情报", new ImageIcon());
		addChildMenu(menu, lowItem, "lowlevelWeather", true);

		// 气象咨询报告
		mjmenu = new JMenu("气象咨询报告");
		tyhItem = new JMenuItem("台风", new ImageIcon("res/images/tyh.png"));
		volcanoitem = new JMenuItem("火山灰", new ImageIcon(
				"res/images/volcano.png"));
		addChildMenu(mjmenu, tyhItem, "taiFengAction", true);
		addChildMenu(mjmenu, volcanoitem, "huoSanHuiAction", true);
		addChildMenu(menu, mjmenu, null);

		// 飞机气象报告
		airItem = new JMenuItem("飞机气象报告", new ImageIcon());
		addChildMenu(menu, airItem, "airplanWeather");

		// 飞行区域预报
		pJMenu = new JMenu("飞行区域预报");
		itemz = new JMenuItem("重要天气预报图", new ImageIcon(""));
		itemg = new JMenuItem("高空风温预报图", new ImageIcon(""));
		addChildMenu(pJMenu, itemz, "importantPrediction");
		addChildMenu(pJMenu, itemg, "hightwinPrediction");
		addChildMenu(menu, pJMenu, null);
		return menu;
	}

	/**
	 * 机场数字通报
	 */
	public void numbersBulletin() {
		System.out.println("mun");
	}

	/**
	 * 气象报文检索
	 */
	public void meteorMessageQuery() {
		System.out.println("气象报文");
	}

	/**
	 * 机场实况预报
	 */
	public void Predictionlive() {
		System.out.println("机场实况");
	}

	/**
	 * 重要气象预报
	 */
	public void importantWeather() {
		System.out.println("重要天气");
	}

	/**
	 * 低空天气
	 */
	public void lowlevelWeather() {
		System.out.println("低空天气");
	}

	/**
	 * 飞机气象报告
	 */
	public void airplanWeather() {
		System.out.println("飞机气象");
	}

	/**
	 * 台风
	 */
	public void taiFengAction() {
		System.out.print("台风测试");
	}

	/**
	 * 火山灰
	 */
	public void huoSanHuiAction() {
		System.out.println("火山灰");
	}

	/**
	 * 重要天气预报图
	 */
	public void importantPrediction() {
		System.out.println("重要天气");
	}

	/**
	 * 高空风温预报图
	 */
	public void hightwinPrediction() {
		System.out.println("高空风温");
	}

	@Override
	protected void offLineVisiable(List<JComponent> jcomps) {
		// TODO Auto-generated method stub

	}
	


}
